navigator.serviceWorker
  .register("./service-work.js", { scope: "./" })
  .then((reg) => {
    console.log("success", reg);
  })
  .catch((err) => {
    console.log("fail", err);
  });
